package client;

/**
 * 
 * Sends objects to the server to handle
 *
 */
public class ObjHandle {
	
	/**
	 * Gets the object and sends to server
	 * @param obj Object to send
	 */
	static public void sendToServer(Object obj)
	{
		if(LogIn.usr.getipAdd().equals(""))
			Main.serverIP = "localhost";
		else 
			Main.serverIP = LogIn.usr.getipAdd();
	
		Main.clie = new ClientConsole(Main.serverIP, Main.DEFAULT_PORT);
		Main.clie.accept(obj);
		Main.clie.flag = false;
		while(Main.clie.flag == false);
		Main.clie.flag = false;
	}

}
